<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/15 0015
 * Time: 上午 9:50
 */
namespace app\common\validate;

class TenantRefund extends BaseValidate{
    protected $rule = [
        'orderNO' => 'require|isNotEmpty',
        'productId' => 'require|isNotEmpty',
        'actiontype' => 'require|checkactiontype',
        'fefund_isall' => 'require|checkactiontype'
    ];

    protected $message = [
        'orderNO' => '缺少订单编号',
        'productId' => '缺少订单商品id',
        'actiontype' => '缺少处理方式，同意或者拒绝',
        'fefund_isall' => '缺少退款方式'
    ];

    protected function checkactiontype($value){
        if($value == 0 || $value == 1){
            return true;
        }else{
            return false;
        }
    }
}